﻿using System;
using System.Collections.Generic;

namespace YJ.Data.Interface
{
    public interface IDocumentDirectory
    {
        /// <summary>
        /// 新增
        /// </summary>
        int Add(YJ.Data.Model.DocumentDirectory model);

        /// <summary>
        /// 更新
        /// </summary>
        int Update(YJ.Data.Model.DocumentDirectory model);

        /// <summary>
        /// 查询所有记录
        /// </summary>
        List<YJ.Data.Model.DocumentDirectory> GetAll();

        /// <summary>
        /// 查询单条记录
        /// </summary>
        Model.DocumentDirectory Get(Guid id);

        /// <summary>
        /// 删除
        /// </summary>
        int Delete(Guid id);

        /// <summary>
        /// 查询记录条数
        /// </summary>
        long GetCount();

        /// <summary>
        /// 得到所有下级栏目(公共栏目)
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<Data.Model.DocumentDirectory> GetChilds(Guid id);

        /// <summary>
        /// 得到最大排序
        /// </summary>
        /// <param name="dirID"></param>
        /// <returns></returns>
        int GetMaxSort(Guid dirID);
    }
}
